package com.ht.sps;

import org.nutz.integration.shiro.ShiroActionFilter;
import org.nutz.mvc.annotation.*;
import org.nutz.mvc.ioc.provider.ComboIocProvider;
import org.nutz.mvc.view.FastJsonViewMaker;
import org.nutz.mvc.view.ThymeleafViewMaker;

/**
 * MVC主模块
 *
 * @author: 薄成文 13-9-12 下午11:07
 */
@Modules(scanPackage = true)
@IocBy(args = {	//配置Ioc容器
        "*org.nutz.ioc.loader.json.JsonLoader","ioc/", //扫描ioc文件夹中的js文件,作为JsonLoader的配置文件
        "*org.nutz.ioc.loader.annotation.AnnotationIocLoader","com.ht.sps", "org.nutz.integration.shiro"},
        type = ComboIocProvider.class)
@SetupBy(MvcSetup.class)
// 全局的Shiro注解过滤器
@Filters(@By(type = ShiroActionFilter.class, args = {"ioc:shiroActionFilter"}))
// Thymeleaf视图, FastJson视图
@Views({ThymeleafViewMaker.class, FastJsonViewMaker.class})
// UTF-8可省略
@Encoding(input="UTF-8",output="UTF-8")
public class MainModule {
    public MainModule() {
        System.out.println("init");
    }
}
